- content_for :meta do
  %meta{:name => "Description", :content => "Jetty Rae's Video: " + @video.name}
  %meta{:name => "Abstract", :content => "Jetty Rae's Video: "  + @video.name}
  %meta{:name => "Keywords", :content => "videos, jetty rae, music, indie, folk, acoustic"}
- content_for :title do
  = "- my video: "  + @video.name
- content_for :page_description do
  %p
    On this page you'll be able to view Jetty Rae's video
    = @video.name
%h1.video= @video.name
%h2.video_caption= "\"#{@video.caption}\""
%table.video{:align => "center"}
  %tr
    %td.video
      %object{:width => "425", :height => "349"}
        %param{:name => "movie", :value => "http://www.youtube.com/v/" + @video.youtube_id + "&hl=en&fs=1&color1=0x006699&color2=0x54abd6&border=1"}
        %param{:name => "allowFullScreen", :value => "true"}
        %embed{:src => "http://www.youtube.com/v/" + @video.youtube_id + "&hl=en&fs=1&color1=0x006699&color2=0x54abd6&border=1", :type => "application/x-shockwave-flash", :allowfullscreen => "true", :width => "425", :height => "349"}
      %div.show_and_song_container
        - if @video.song
          I'm singing 
          %a{:href => song_url(@video.song), :title => @video.song.name, :alt => @video.song.name}= @video.song.name
        - if @video.show
          - unless @video.song 
            Taken 
          at
          %a{:href => show_url(@video.show), :alt => @video.show.location, :title => @video.show.location + " on " + @video.show.start_time.strftime("%B %o, %Y")}=@video.show.location
  %tr
    %td.video_description= @video.description
  - if logged_in? && current_user.is_admin?
    %tr
      %td
        %table
          %tr
            %td.field_title Edit:
            %td.field
              %a{:href => edit_video_url(@video), :title => "Edit \"#{@video.name}\"", :alt => "Edit \"#{@video.name}\""}="Edit \"#{@video.name}\""
%hr
- unless @video.comments.empty?
  %div.heading
    %img.heading{:src => "/images/headings/comments.jpg", :title => "Comments", :alt => "Comments"}
  %ol.comment_list
    - @video.comments.each do |comment|
      %li.comment
        - if logged_in? && current_user.is_admin?
          %div.delete_comment
            - form_for comment, comments_url, :html => {:method => :delete} do |form|
              = submit_tag "delete"
        %a.comment_user{:href => user_url(comment.user)}= comment.user.login
        says:
        %p.comment_date= comment.created_at.strftime("%B %o at %I:%M %p")
        %p.comment_text= comment.text
- if logged_in?
  %table.new_comment
    - form_for @comment do |form|
      %tr
        %td= error_messages_for :comment
      %tr
        %td
          %input{:value => @video.id, :name => "comment[video_id]", :type => "hidden"}
          = form.text_area :text, :class => "comment_entry"
      %tr  
        %td.submit= submit_tag 'add comment'
- else
  %p.new_comment
    = "Have something to say about \"" + @video.name + "?\""
    %a{:href => login_url, :title => "Login to jetty rae's website"}Login
    or
    %a{:href => signup_url, :title => "Sign up on jetty rae's website"}Signup